/**
 * 
 * @param {*} fieldConfig 
 * @param {*} number 
 */
export const getTableDataList = (fieldConfig, number) => {
    const mockdata = []
    for(let i = 0; i < number; i ++) {
        const rowData = {}
        fieldConfig.forEach((item, index) => {
            const { name, field } = item
            rowData[field] = `模拟${ name }数据`
        })
        mockdata.push(rowData)
    }
    return mockdata
}


/**
 * 
 * @param {*} fieldConfig 
 * @param {*} number 
 */
export const getTableFieldConfig = (number) => {
    const fieldlist = []
    for(let i = 0; i < number; i ++) {
        fieldlist.push({
            name: `字段${ i }`,
            field: `test${ i }_field`,
            default: false,
        })
    }
    return fieldlist
}



export const fieldConfig = [

]


export const mockTableData = [

]

export const dialogFormConfig = [
    {
        type: 'input',
        name: '名称',
        key: 'input_default',
    },
    {
        type: 'inputnumber',
        name: '年龄',
        key: 'inputnumber_default',
    },
    {
        type: 'input',
        name: '电脑型号',
        key: 'input_default2',
    },
    {
        type: 'input',
        name: '工作',
        key: 'input_default3',
    },
    {
        type: 'select',
        name: '性别',
        key: 'select_default',
        childrenList: [
            { name: '男', key: '1' },
            { name: '女', key: '2' },
            { name: '保密', key: '3' }
        ]
    },
    {
        type: 'date',
        name: '生日',
        key: 'date_default'
    },
    {
        type: 'checkboxgroup',
        name: '兴趣爱好',
        key: 'checkboxgroup_default',
        childrenList: [
            { name: '钓鱼', key: '1' },
            { name: '看电视', key: '2' },
            { name: '打游戏', key: '3' },
            { name: '滑雪', key: '4' }
        ]
    },
    {
        type: 'radiogroup',
        name: '最爱的游戏',
        key: 'radiogroup_default',
        childrenList: [
            { name: '吃鸡', key: '1' },
            { name: 'LOL', key: '2' },
            { name: '永劫无间', key: '3' },
            { name: 'GTA6', key: '4' }
        ]
    },
    {
        type: 'daterange',
        name: '上班时间',
        key: 'timerange_default'
    }
] 